package com.xxxx.seckill.config;

import com.xxxx.seckill.pojo.User;

public class UserContext {

    private static ThreadLocal<User> useHolder = new ThreadLocal<>();

    public static void setUser(User user){
        useHolder.set(user);
    }
    public static User getUser(){
        return useHolder.get();
    }
}
